#include<iostream>
using namespace std;
int main()
{
	int m,i;
	cin>>m;
	i=m;
	while(i-->1)
	{	
		m=m*i;
	}
	cout<<m;
	return 0;
} 
